
project_info_sql = '''
SELECT
	crm_project.project_fullname,
	crm_project.project_structure_category,
	crm_project.project_scale ,
	crm_project.project_building_category ,
	crm_project.project_investment_amount ,
	crm_tender_announcement.project_section_name,
	crm_tender_announcement.project_section_period ,
	crm_tender_announcement.project_section_evaluation_amount ,
	crm_enterprise.enterprise_name,
	crm_project_contactor.projectcontractor_name ,
	crm_enterprise_bidding.win_bidding_time,
	crm_enterprise.crm_enterprise_id,
	crm_tender_announcement.crm_tender_announcement_id
FROM
	crm_enterprise_bidding
JOIN crm_enterprise ON
	crm_enterprise_bidding.PK_crm_enterprise_id = crm_enterprise.crm_enterprise_id
JOIN crm_tender_announcement ON
	crm_enterprise_bidding.PK_crm_tender_announcement_id = crm_tender_announcement.crm_tender_announcement_id
JOIN crm_project_contactor ON
	crm_project_contactor.crm_project_contactor_id = crm_enterprise_bidding.PK_crm_project_contactor_id
JOIN crm_project ON
	crm_project.crm_project_id = crm_tender_announcement.PK_crm_project_id
'''



project_contact_sql ="""
SELECT
	`role`,
	crm.crm_enterprise.enterprise_name
FROM
	crm.crm_project_enterprise_relation
join crm.crm_enterprise on
	crm.crm_enterprise.crm_enterprise_id = crm.crm_project_enterprise_relation.PK_crm_tender_announcement_id
where
	PK_crm_tender_announcement_id = %s"""